/*
 * @Author: HanYaJun
 * @Date: 2023-01-04 11:45:11
 * @Email: hanyajun@wedobest.com.cn
 * @Description: 消消乐
 */


const { ccclass, property } = cc._decorator;

@ccclass
export default class Main extends cc.Component {
    /**
     * @description: 当附加到一个激活的节点上或者其节点第一次激活时候调用
     */
    protected onLoad(): void {

    }

    /**
     * @description: 点击事件
     * @param {cc} event
     */
    public clickEvent(event: cc.Event.EventTouch): void {
        let name = event.target.name;
        switch (name) {
            case 'startGame': {
                let loginPage: cc.Node = this.node.getChildByName("loginPage");
                loginPage.active = false;
                break;
            }
            default: {
                break;
            }
        }
    }

    /**
     * @description: 当该组件被销毁时调用
     */
    protected onDestroy(): void {

    }
}
